import request from '@/utils/request'
import {HealthInfo} from "../types/healthInfo";

// 更新健康信息
export const updateHealthInfo = (data: {
  id?: number;
  elderId: number;
  medical_history: string | null;
  medication_records: string | null;
}) => {
  return request<boolean>({
    url: '/elder/updateHealthInfo',
    method: 'post',
    data
  })
}

// 获取健康信息
export const getHealthInfo = (elderId: number) => {
  return request<HealthInfo>({
    url: '/elder/getHealthInfo',
    method: 'get',
    params: { elderId }
  })
} 